SPB Git forge

spb/websensor

Public
33commits 1branches 0releases
3.4 MBsize
maindefault branch
10 days agolast push
TypeScript 55.4% Python 43.2% SQL 1.2%
490 B · 12 lines tsx
Raw Blame History
1import { notFound } from "next/navigation";2import type { ReactNode } from "react";3import { api } from "@/lib/api";45/** Existence check outside the `loading.tsx` boundary so unknown clusters answer with a real 404 (see entity/[id]/layout.tsx). */6export default async function ClusterLayout({ params, children }: { params: Promise<{ slug: string }>; children: ReactNode }) {7  const { slug } = await params;8  const d = await api.cluster(slug);9  if (!d) notFound();10  return children;11}12